<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    
    <style>
        .outer{
            height: 500px;
            border-bottom: 10px solid black;
            overflow: hidden;
        }
        .outer div{
            float: left;
            width: 100px;
            height: 100px;
            border-radius: 50%;
            background-color: #bfa;

            animation:ball 1s forwards ease-in infinite alternate;
        }
        .outer div.box2{
            background-color: #ff6700;
            animation-delay: .1s;
        }
        .outer div.box3{
            background-color: yellowgreen;
            animation-delay: .2s;
        }
        .outer div.box4{
            background-color: blue;
            animation-delay: .3s;
        }
        .outer div.box5{
            background-color: pink;
            animation-delay: .4s;
        }
        .outer div.box6{
            background-color: tomato;
            animation-delay: .5s;
        }
        .outer div.box7{
            background-color: chocolate;
            animation-delay: .6s;
        }

        @keyframes ball {
            from{
                margin-top: 0;
            }
            20%,60%,to{
                margin-top: 400px;
                animation-timing-function: ease-out;
            }
            40%{
                margin-top: 100px;
            }
            80%{
                margin-top: 200px;
            }
        }
    </style>
</head>
<body>
<div class="outer">
    <div class="box1"></div>
    <div class="box2"></div>
    <div class="box3"></div>
    <div class="box4"></div>
    <div class="box5"></div>
    <div class="box6"></div>
    <div class="box7"></div>
</div>
</body>
</html>
